package com.tuyrt.firstcode.kotlin.eg

import com.tuyrt.firstcode.kotlin.coroutine.await
import com.tuyrt.firstcode.utils.ServiceCreator

/**
 * Created by tuyrt7 on 2021/4/12.
 */

fun main() {


}

suspend fun getAppData() {
    try {
        val data = ServiceCreator.create<AppService>().getData().await()
        //处理 data
    } catch (e: Exception) {
        //处理异常情况
    }
}